Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lint to detect usage of invalid atomic ordering #4999

Merged

Conversation

krishna-veerareddy
Copy link
Contributor

@krishna-veerareddy krishna-veerareddy commented Jan 5, 2020

Detect usage of invalid atomic ordering modes such as Ordering::{Release, AcqRel} in atomic loads and Ordering::{Acquire, AcqRel} in atomic stores.

Fixes #4679

changelog: Add lint [invalid_atomic_ordering]

Copy link
Member

@phansch phansch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor things, looks good to me otherwise 👍

clippy_lints/src/atomic_ordering.rs Outdated Show resolved Hide resolved
clippy_lints/src/atomic_ordering.rs Outdated Show resolved Hide resolved
@flip1995 flip1995 added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Jan 6, 2020
Detect usage of invalid atomic ordering modes such as
`Ordering::{Release, AcqRel}` in atomic loads and
`Ordering::{Acquire, AcqRel}` in atomic stores.
@phansch
Copy link
Member

phansch commented Jan 7, 2020

@bors r+ thanks!

@bors
Copy link
Collaborator

bors commented Jan 7, 2020

📌 Commit fe21ef4 has been approved by phansch

@phansch phansch removed the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Jan 7, 2020
@bors
Copy link
Collaborator

bors commented Jan 7, 2020

⌛ Testing commit fe21ef4 with merge a86301f...

bors added a commit that referenced this pull request Jan 7, 2020
…r=phansch

Add lint to detect usage of invalid atomic ordering

Detect usage of invalid atomic ordering modes such as `Ordering::{Release, AcqRel}` in atomic loads and `Ordering::{Acquire, AcqRel}` in atomic stores.

Fixes #4679

changelog: Add lint [`invalid_atomic_ordering`]
@bors
Copy link
Collaborator

bors commented Jan 7, 2020

☀️ Test successful - checks-travis, status-appveyor
Approved by: phansch
Pushing a86301f to master...

@bors bors merged commit fe21ef4 into rust-lang:master Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check Ordering used for Atomic*::store and Atomic*::load
4 participants